package com.m.job.logs.mapper;

import com.m.job.logs.model.MJobInstanceHistory;
import com.m.job.logs.model.dto.MJobInstanceHistoryDto;

import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface MJobInstanceHistoryMapper {
    /**
     * delete by primary key
     * @param intanceHistoryId primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(String intanceHistoryId);

    /**
     * insert record to table
     * @param record the record
     * @return insert count
     */
    int insert(MJobInstanceHistory record);

    /**
     * insert record to table selective
     * @param record the record
     * @return insert count
     */
    void insertSelective(MJobInstanceHistory record);

    /**
     * select by primary key
     * @param intanceHistoryId primary key
     * @return object by primary key
     */
    MJobInstanceHistory selectByPrimaryKey(String intanceHistoryId);

    /**
     * update record selective
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(MJobInstanceHistory record);

    

    /**
     * 批量新增
     * @param historyList
     * @return
     */
    void insertBatch(List<MJobInstanceHistory>  historyList);

    /**
     * 列表查询
     * @param history
     * @return
     */
    List<MJobInstanceHistoryDto> getList(MJobInstanceHistoryDto history);

}